package com.site.controller;

import com.site.util.PDFUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * author chics
 * date  2023/3/27
 */
public class PDFTestController {

    public static void main(String[] args) throws Exception {
        String source = "D:\\pdf\\蓝牛快递单模板.pdf";
        String newFile = "D:\\pdf\\001.pdf";
        Map<String, String> map = new HashMap<>();
        map.put("order_image","https://lupic.cdn.bcebos.com/20210629/2000391376_14.jpg");
        map.put("senderName","小二1111");
        map.put("createTime", "2023-03-29 10:10:10");
        map.put("senderTelephone", 1570609L+"");
        map.put("senderAddress", "深圳");

        boolean result = PDFUtil.pdfExportMethod(source, map, newFile);
        if (result){
            PDFUtil.pdfToImages("D:\\pdf\\蓝牛快递单模板.pdf","D:\\pdf\\",100);
        }
    }
}
